#ifndef JSONITEM_H
#define JSONITEM_H

#include <QWidget>
#include <QPushButton>
#include <QTextEdit>

class JsonItem : public QWidget
{
    Q_OBJECT
public:
    JsonItem(QWidget *parent = nullptr);

private:
    void onInit();

private slots:
    void onFormat();
    void onCompress();
    void onEscape();
    void onReverse();
private:
    QTextEdit *m_textEdit = nullptr;
    QPushButton *m_formatBtn = nullptr;   // 格式化按钮
    QPushButton *m_compressBtn = nullptr; // 压缩按钮
    QPushButton *m_escapeBtn = nullptr;   // 转义
    QPushButton *m_reverseBtn = nullptr;  // 去转义
};

#endif // JSONITEM_H
